package com.skaz.util;

import com.skaz.bean.Result;

import java.util.Map;

/**
 * @Author: jungle
 * @Date: 2018/11/2 4:30 PM
 */
public class Results {

    public static Result success() {
        return new Result(null,true, null, null);
    }

    public static <E> Result successWithData(E data) {
        return new Result(null,true, null, data);
    }

    public static Result success(String msg) {
        return new Result(null,true, msg, null);
    }

    public static Result failure() {
        return new Result(null,false, null, null);
    }

    public static Result failure(String msg) {
        return new Result(null,false, msg, null);
    }

    public static Object failureWithData(Integer status, Map<String, Object> content, String message) {
        return new Result(status, false, message, content);
    }
}
